package org.example;

public class 第二十二章_重写Override与重载Overload {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.move();
        dog.move(15);
    }

    static class Animal{
        public void move(){
            System.out.println("动物可以移动");
        }
    }

    static class Dog extends Animal{
        public void move(){
            System.out.println("狗可以跑和走");
        }

        public void move(int age){
            System.out.println("狗可以跑和走");
        }
    }
}
